package com.ruoyi.system.config.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * 邮箱验证码相关配置
 *
 * @author 刘逸晖
 */
@ConfigurationProperties(prefix = "ruoyi.verification-code.email")
@Component
public class EmailVerificationCodeProperties {

    /**
     * 存放所有发送任务的键
     */
    private String tasksKey;

    /**
     * 所有验证码键的前缀
     */
    private String codesKeyPrefix;

    /**
     * 所有验证码的有效期，单位分钟
     */
    private Integer codeExpiry;

    @Override
    public String toString() {
        return "EmailVerificationCodeProperties{" +
                "tasksKey='" + tasksKey + '\'' +
                ", codesKeyPrefix='" + codesKeyPrefix + '\'' +
                ", codeExpiry=" + codeExpiry +
                '}';
    }

    public String getTasksKey() {
        return tasksKey;
    }

    public void setTasksKey(String tasksKey) {
        this.tasksKey = tasksKey;
    }

    public String getCodesKeyPrefix() {
        return codesKeyPrefix;
    }

    public void setCodesKeyPrefix(String codesKeyPrefix) {
        this.codesKeyPrefix = codesKeyPrefix;
    }

    public Integer getCodeExpiry() {
        return codeExpiry;
    }

    public void setCodeExpiry(Integer codeExpiry) {
        this.codeExpiry = codeExpiry;
    }
}